package cn.wolfcode.trip.app.web.controller;


import cn.wolfcode.trip.base.domain.StrategyCatalog;
import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import cn.wolfcode.trip.base.service.IStrategyCatalogService;
import cn.wolfcode.trip.base.service.IStrategyService;
import cn.wolfcode.trip.base.service.ITravelService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/strategyTravels")
public class StrategyTravelController {

    @Autowired
    private ITravelService travelService;

    @GetMapping
    @ResponseBody
    public Object getStrategyTravelsByStrategyId(Long strategyId){
        List<Travel> list = travelService.achieveStrategyTravelsByStrategyId(strategyId);
            return list;
    }

}
